<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<script>

  window.onload = function () {
    let text1 = document.getElementById("text1")
    let btn1 = document.getElementById("btn1")
    let text2 = document.getElementById("text2")

    btn1.onclick = function () {
      text2.value = text2.value + text1.value + "\n"
      text1.value = ""
    }

    text1.onkeyup = function (event) {
      if (event.key == "Enter" && event.ctrlKey) {
        btn1.onclick()
      }
    }

  }
</script>

<body>

  <input id="text1" type="text" />
  <input id="btn1" type="button" value="发布" />
  <br>
  <textarea id="text2" rows="10" cols="40"></textarea>

</body>

</html>